MAINTAINERCLEANFILES = Makefile.in
CLEANFILES = mybrk.tri mdict.txt

dictdatadir = $(datadir)/libburmese

if ENABLE_DICT
dictdata_DATA = mybrk.tri
else
dictdata_DATA =
endif

MDICT_SRC = \
	$(srcdir)/mdict-common.txt

EXTRA_DIST = mybrk.abm $(MDICT_SRC)

mdict.txt: $(MDICT_SRC)
	cat $(MDICT_SRC) | LC_ALL=C sort -u > mdict.txt

mybrk.tri: mdict.txt
	if test ! -e mybrk.abm; then \
	  ln -s $(top_srcdir)/data/mybrk.abm . ; \
	fi
	rm -f mybrk.tri
	$(TRIETOOL) mybrk add-list -e utf-8 mdict.txt

